import Vue from 'vue'
import Router from 'vue-router'

import Home from '../components/Home/Home'
import NewsList from '../components/Home/ChildPage/News/NewsList'
import NewsInfo from '../components/Home/ChildPage/News/NewsInfo'
import PicShare from '../components/Home/ChildPage/Photos/PicShare'
import PicInfo from '../components/Home/ChildPage/Photos/PicInfo'

import GoodsList from '../components/Home/ChildPage/Prod/GoodsList'
import GoodsInfo from '../components/Home/ChildPage/Prod/GoodsInfo'
import GoodsDesc from '../components/Home/ChildPage/Prod/GoodsDesc'
import GoodsCmt from '../components/Home/ChildPage/Prod/GoodsComment'

import Message from '../components/Home/ChildPage/Messages/Message'
import Tags from '../components/Home/ChildPage/Tags/Tags'
import CallUs from '../components/Home/ChildPage/CallUs/CallUs'

import ShopCar from '../components/ShopCar/ShopCar'

import Music from '../components/Music/Music'
import RankPage from '../components/Music/ChildPage/Rank/RankPage'
import Album from '../components/Music/ChildPage/Album/Album'
import Singer from '../components/Music/ChildPage/Singer/Singer'

import Game from '../components/Game/Game'

Vue.use(Router)

export default new Router({
  mode: 'history',
  routes: [
    { path: '/', redirect: 'home' },
    
    { path: '/home', name: 'home', component: Home },
    { path: '/home/newslist', name: 'newslist', component: NewsList },
    { path: '/home/newsinfo/:id', name: 'newsinfo', component: NewsInfo },
    { path: '/home/picshare', name: 'picshare', component: PicShare },
    { path: '/home/picinfo/:id', name: 'picinfo', component: PicInfo },
    { path: '/home/goodslist', name: 'goodslist', component: GoodsList },
    { path: '/home/goodsinfo/:id', name: 'goodsinfo', component: GoodsInfo },
    { path: '/home/goodsdesc/:id', name: 'goodsdesc', component: GoodsDesc },
    { path: '/home/goodscomment/:id', name: 'goodscmt', component: GoodsCmt },
    { path: '/home/message' ,name: 'message', component: Message },
    { path: '/home/tags', name: 'tags', component: Tags },
    { path: '/home/callus', name: 'callus', component: CallUs },
    
    { path: '/shopcar', name: 'shopcar', component: ShopCar },
    
    { path: '/music', name: 'music', component: Music,
      children: [
        { path: 'rank/:id', name: 'rank', component: RankPage },
        { path: 'album/:id', name: 'album', component: Album },
        { path: 'singer/:id', name: 'singer', component: Singer }
      ] },
    
    { path: '/game', name: 'game', component: Game }
  ],
  linkActiveClass: 'mui-active'
})
